# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ayatana-indicator-printers
pkgver=22.2.0
pkgrel=0
pkgdesc="Ayatana Indicator Printers Applet"
url="https://github.com/AyatanaIndicators/ayatana-indicator-printers"
arch="all"
license="GPL-3.0-only"
makedepends="
	autoconf
	automake
	cups-dev
	glib-dev
	gtk+3.0-dev
	intltool
	libayatana-indicator-dev
	libdbusmenu-gtk3-dev
	libtool
	mate-common
	"
subpackages="$pkgname-lang"
source="https://github.com/AyatanaIndicators/ayatana-indicator-printers/archive/$pkgver/ayatana-indicator-printers-$pkgver.tar.gz"
options="!check" # no clear way to run tests

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install

	# Remove static library
	rm "$pkgdir"/usr/lib/ayatana-indicators3/7/libayatana-printersmenu.a
}

sha512sums="
7931011e4830602b84d81bde36f88967cc23bafdc3e4b7b6416bc0a58efec81434fd6628041df310221f406555f9714bff9602730cc9eca8d46104673208014b  ayatana-indicator-printers-22.2.0.tar.gz
"
